<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ include file="../general/header.jsp" %>
	<h3>Usuarios Administradores</h3>
	<div class="menuacciones">
		<a href="../user/AbmUsers" class="boton childmenu"><span class="childmenutext">Crear Administrador</span></a>
	</div>	
	<div class="featurebox_center" id="search">
		<table class="listas">
			<thead>
				<tr style="font-weight:bold;"> 
					<th> N&uacute;mero de documento </th>  
					<th> Nombre </th> 
					<th> Apellido </th> 				 					
					<th> E-mail </th> 
					<th> &Uacute;ltima visita</th>
					<th class="center"> Editar </th>
					<th class="center"> Borrar </th>
				</tr>
			</thead>
			<tbody>
				<c:forEach var="user" items="${users}">
					<tr>
						<td> <c:out value="${user.docNumber}" /> </td>  
						<td> <c:out value="${user.name}" /> </td> 
						<td> <c:out value="${user.lastName}" /> </td> 				 					
						<td> <c:out value="${user.email}" /> </td>
						<td> <fmt:formatDate pattern="dd/MM/yyyy" value="${user.lastAccess}" /> </td>
						<td class="center"> <a href="ModifyUser?userid=${user.id}"><img src="../../img/edit.png" class="edit"></a></td>
						<td class="center">
						<c:if test="${userlogged.id!=user.id}">
							 <a onclick="return confirm('Si presiona OK, el usuario administrador ser&aacute; borrado definitivamente');" href="DeleteUser?userid=${user.id}"><img src="../../img/delete.png" class="edit"></a>
						</c:if>						
						</td>
					</tr>
				</c:forEach>
			</tbody>
		</table>		
	</div>					
					
<%@ include file="../general/footer.jsp" %>

